home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / complib / sgtsv.z / sgtsv
Text File  |  1998-10-30  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSGGGGTTTTSSSSVVVV((((3333FFFF))))                                                            SSSSGGGGTTTTSSSSVVVV((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SGTSV - solve the equation   A*X = B,
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      SUBROUTINE SGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
  13.  
  14.          INTEGER       INFO, LDB, N, NRHS
  15.  
  16.          REAL          B( LDB, * ), D( * ), DL( * ), DU( * )
  17.  
  18. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  19.      SGTSV  solves the equation
  20.  
  21.      where A is an N-by-N tridiagonal matrix, by Gaussian elimination with
  22.      partial pivoting.
  23.  
  24.      Note that the equation  A'*X = B  may be solved by interchanging the
  25.      order of the arguments DU and DL.
  26.  
  27.  
  28. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  29.      N       (input) INTEGER
  30.              The order of the matrix A.  N >= 0.
  31.  
  32.      NRHS    (input) INTEGER
  33.              The number of right hand sides, i.e., the number of columns of
  34.              the matrix B.  NRHS >= 0.
  35.  
  36.      DL      (input/output) REAL array, dimension (N-1)
  37.              On entry, DL must contain the (n-1) subdiagonal elements of A.
  38.              On exit, DL is overwritten by the (n-2) elements of the second
  39.              superdiagonal of the upper triangular matrix U from the LU
  40.              factorization of A, in DL(1), ..., DL(n-2).
  41.  
  42.      D       (input/output) REAL array, dimension (N)
  43.              On entry, D must contain the diagonal elements of A.  On exit, D
  44.              is overwritten by the n diagonal elements of U.
  45.  
  46.      DU      (input/output) REAL array, dimension (N-1)
  47.              On entry, DU must contain the (n-1) superdiagonal elements of A.
  48.              On exit, DU is overwritten by the (n-1) elements of the first
  49.              superdiagonal of U.
  50.  
  51.      B       (input/output) REAL array, dimension (LDB,NRHS)
  52.              On entry, the N-by-NRHS right hand side matrix B.  On exit, if
  53.              INFO = 0, the N-by-NRHS solution matrix X.
  54.  
  55.      LDB     (input) INTEGER
  56.              The leading dimension of the array B.  LDB >= max(1,N).
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSGGGGTTTTSSSSVVVV((((3333FFFF))))                                                            SSSSGGGGTTTTSSSSVVVV((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      INFO    (output) INTEGER
  75.              = 0:  successful exit
  76.              < 0:  if INFO = -i, the i-th argument had an illegal value
  77.              > 0:  if INFO = i, U(i,i) is exactly zero, and the solution has
  78.              not been computed.  The factorization has not been completed
  79.              unless i = N.
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.